package com.mdmedia.cms.service.impl;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import com.mdmedia.cms.entiy.base.User;
import com.mdmedia.cms.dao.IUserDao;

@Service("serviceuser")
public class UserServiceImpl extends BaseServiceImpl<User,IUserDao>{

	@Autowired
	@Qualifier("daoUser")
	private IUserDao userDao;
	
	@Override
	public IUserDao getDao() throws Exception {
		return userDao;
	}

	public IUserDao getUserDao() {
		return userDao;
	}

	public void setUserDao(IUserDao userDao) {
		this.userDao = userDao;
	}

	@Override
	public String getHql(Map<String, String> querywhere) throws Exception {
		String hql ="";
		if(null==querywhere ||querywhere.isEmpty() ){
			hql = " from "+com.mdmedia.cms.entiy.base.User.class.getName()+" t";
		}
		return hql;
	}

}
